import cv2
import numpy as np

img = cv2.imread('C:\\Users\\Mengyang\\Desktop\\112.png')

#new = cv2.resize(img,(400,400))
#按比例缩放
print(img.shape)
#new = cv2.resize(img,None,fx=0.7,fy=0.7) 
new = cv2.resize(img,None,fx=0.7,fy=0.7,interpolation = cv2.INTER_AREA)  #采用插值算法

cv2.imshow('img',img)
cv2.imshow('new',new)

cv2.waitKey(0)